//
//  RankListCell.swift
//  FastFinger
//
//  Created by mugua on 2018/6/27.
//  Copyright © 2018年 mugua. All rights reserved.
//

import UIKit

class RankListCell: UITableViewCell {
    
    @IBOutlet weak var score: UILabel!
    @IBOutlet weak var rankLabel: UILabel!
    @IBOutlet weak var nameLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        layer.shadowColor = UIColor.white.cgColor
        layer.shadowOffset = CGSize(width: 0.5, height: 4) //Here your control your spread
        layer.shadowOpacity = 0.5
        layer.shadowRadius = 3.0 //Here your control your blur
        backgroundColor = UIColor(white: 1, alpha: 0.2)
        layer.cornerRadius = 7
        clipsToBounds = true
        
        rankLabel.clipsToBounds = true
        rankLabel.layer.cornerRadius = rankLabel.bounds.height / 2
        rankLabel.layer.borderWidth = 1
        rankLabel.layer.borderColor = UIColor.white.cgColor
        rankLabel.backgroundColor = randomColors(count: 10, hue: .orange, luminosity: .dark)[Int(arc4random_uniform(9))]
     
        score.text = "得分: " + arc4random_uniform(100).description
    }
    
}
